import request from '@/utils/request';

export async function querySensitiveWindowList(page_num, page_size, type) {
  return request(
    `/api/gold/sensitive_period_list?page_num=${page_num}&page_size=${page_size}&report_type=${type}`,
    { page_num, page_size, type }
  );
}

export async function addSensitiveWindow(report_type, published_state, published_time) {
  return request(`/api/gold/sensitive_period_create`, {
    method: 'POST',
    body: {
      report_type,
      published_state,
      published_time,
    },
  });
}

export async function updateSensitiveWindow(report_type, published_state, published_time, id) {
  return request(`/api/gold/sensitive_period_update`, {
    method: 'POST',
    body: {
      report_type,
      published_state,
      published_time,
      id,
    },
  });
}

export async function deleteSensitiveWindow(id) {
  return request(`/api/gold/sensitive_period_delete`, {
    method: 'POST',
    body: {
      id,
    },
  });
}
